package com.yinhe.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yinhe.system.mapper.YhVotePeopleMapper;
import com.yinhe.system.domain.YhVotePeople;
import com.yinhe.system.service.IYhVotePeopleService;

/**
 * 投票人信息Service业务层处理
 *
 * @author yinhe
 * @date 2022-09-06
 */
@Service
public class YhVotePeopleServiceImpl implements IYhVotePeopleService
{
    @Autowired
    private YhVotePeopleMapper yhVotePeopleMapper;

    /**
     * 查询投票人信息
     *
     * @param id 投票人信息主键
     * @return 投票人信息
     */
    @Override
    public YhVotePeople selectYhVotePeopleById(Long id)
    {


        return yhVotePeopleMapper.selectYhVotePeopleById(id);
    }

    /**
     * 查询投票人信息列表
     *
     * @param yhVotePeople 投票人信息
     * @return 投票人信息
     */
    @Override
    public List<YhVotePeople> selectYhVotePeopleList(YhVotePeople yhVotePeople)
    {
        return yhVotePeopleMapper.selectYhVotePeopleList(yhVotePeople);
    }
    @Override
    public List<YhVotePeople> selectYhVotePeopleByUserId()
    {
        return yhVotePeopleMapper.selectYhVotePeopleByUserId();
    }
    /*@Override
    public List<YhVotePeople> selectYhVotePeopleByVoteOptionId()
    {
        return yhVotePeopleMapper.selectYhVotePeopleByVoteOptionId();
    }*/

    /**
     * 新增投票人信息
     *
     * @param yhVotePeople 投票人信息
     * @return 结果
     */
    @Override
    public int insertYhVotePeople(YhVotePeople yhVotePeople)
    {
        return yhVotePeopleMapper.insertYhVotePeople(yhVotePeople);
    }

    /**
     * 修改投票人信息
     *
     * @param yhVotePeople 投票人信息
     * @return 结果
     */
    @Override
    public int updateYhVotePeople(YhVotePeople yhVotePeople)
    {
        return yhVotePeopleMapper.updateYhVotePeople(yhVotePeople);
    }

    /**
     * 批量删除投票人信息
     *
     * @param ids 需要删除的投票人信息主键
     * @return 结果
     */
    @Override
    public int deleteYhVotePeopleByIds(Long[] ids)
    {
        return yhVotePeopleMapper.deleteYhVotePeopleByIds(ids);
    }

    /**
     * 删除投票人信息信息
     *
     * @param id 投票人信息主键
     * @return 结果
     */
    @Override
    public int deleteYhVotePeopleById(Long id)
    {
        return yhVotePeopleMapper.deleteYhVotePeopleById(id);
    }
}
